<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>JavaScript数字和字符串</title>
</head>

<body>
    <h1>JavaScript 变量</h1>

    <p>字符串用引号包围。</p>
    <p>数值不用引号包围。</p>

    <p id="demo"></p>

    <script>
        var pi = 3.14;
        var person = "Bill Gates";
        var answer = 'How are you!';

        document.getElementById("demo").innerHTML =
            pi + "<br>" + person + "<br>" + answer;
    </script>

</body>

</html>